Transition from controlled to assisted mechanical ventilation